﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WeiBoUI.ToolstripEx
{
    public class LeftMainToolStrip : ToolStrip
    {
        private bool firstTime;

        public LeftMainToolStrip()
            :base()
        {
            this.Cursor = System.Windows.Forms.Cursors.Hand;
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            if (!this.firstTime)
            {
                this.Renderer = new LeftMainStripRenderer();

                // Comment this line to see the unscrambled image.
                //this.ScrambleButtons();
                this.firstTime = true;
            }
        }

        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            foreach (ToolStripButton btn in this.Items)
            {
                btn.Checked = false;
            }
        }
    }
}
